//
//  XLCvstInputMoreItemModel.m
//  XLConversationInputView
//
//  Created by ilongge on 2024/3/6.
//

#import "XLCvstInputMoreItemModel.h"

@interface XLCvstInputMoreItemModel()
@property (nonatomic, strong) UIImage *iconImage;
@property (nonatomic,   copy) NSString *titleText;
@property (nonatomic, assign) NSInteger type;
@property (nonatomic, strong) NSDictionary *customProperty;
@end
@implementation XLCvstInputMoreItemModel
- (instancetype)initWithType:(NSInteger)itemType
                   titleText:(NSString *)titleText
                   iconImage:(UIImage *)iconImage
              customProperty:(NSDictionary *)customProperty
{
    self = [super init];
    if (self) {
        NSAssert( (itemType != MoreItemType_Text)
                 &&
                 (itemType != MoreItemType_Voice)
                 &&
                 (itemType != MoreItemType_AtSomeone)
                 &&
                 (itemType != MoreItemType_AtSomeoneDelete), @"自定义枚举类不可与内部有相同数值");
        self.type = itemType;
        self.titleText = titleText;
        self.iconImage = iconImage;
        self.customProperty = customProperty.copy;
    }
    return self;
}

- (id)copyWithZone:(NSZone *)zone
{
    XLCvstInputMoreItemModel *item = [[XLCvstInputMoreItemModel alloc] initWithType:self.type
                                                                          titleText:self.titleText.copy
                                                                          iconImage:self.iconImage.copy
                                                                     customProperty:self.customProperty.copy];
    return item;
}
@end
